home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
PROGRAMR
/
BTNGO.ZIP
/
BTNGO.DOC
next >
Wrap
Text File
|
1993-08-02
|
9KB
|
168 lines
BTNGO.EXE (VERSION 1.0) Copyright (c) John Deurbrouck
-------------------------------------------------------------------------
First Published in PC Magazine September 14, 1993 (Utilities)
-------------------------------------------------------------------------
BTNGO BY JOHN DEURBROUCK
One-click launching can replace a crowded Program Manager's
multichoice selection process for your favorite apps.
Has your Program Manager screen become so cluttered that you must
double-click on a group and then double-click on an icon just to launch
one of your most often-used applications? If so, this issue's utility,
BTNGO (for ButtonGo), will provide you with a convenient alternative.
BTNGO lets you set up a button bar that displays the icons of just
the programs you run most frequently. All you have to do is click once on
any button, and the program is launched. BTNGO uses the Program Manager's
facilities to create the icon group. Under Windows 3.1, the utility's
button bar can even float above other Windows applications, so you don't
have to return to the Program Manager in order to switch to another
program. BTNGO is also compatible with Windows 3.0, with some limitations,
which will be discussed in the course of this article.
The source code is compatible with both Borland C++ 3.1 and
Visual C++ 1.0, though if you need to produce a Windows 3.0-compatible
executable, you must use the Borland rather than the Microsoft compiler.
INSTALLING AND USING BTNGO
After copying BTNGO onto your hard disk, you can get a quick idea
of how the utility works by using the Program Manager's FileRun command.
When started in this way, BTNGO brings up a dialog box that allows you
to choose an already-established Program Manager group (.GRP) file to
load. Select one of these, click OK, and BTNGO will transform the group
into a button bar. A single (or double) click on a BTNGO button will
then launch the corresponding program.
Group filenames can be somewhat cryptic. It's a good guess that
your Accessories group has the default filename of ACCESSOR.GRP, but it
may not. One way to check is through Program Manager. If the desired
group is opened, you must first minimize it. Then select FileProperties
(or, in Windows 3.1, hit Alt-Enter). The dialog box that is displayed
shows both the group's name (for example, Accessories) and the filename
(for example, C:\WINDOWS\ACCESSOR.GRP). Use the filename you find to
create the ButtonGo button bar.
You'll notice that BTNGO's caption bar normally displays ButtonGo
and the name of the group file you've loaded. If you click and hold down
the left mouse button on any BTNGO button, however, the caption will
change to show both the name you've given that program icon and the
executable filename. For example, the README.WRI file in Windows' Main
group will be displayed as ``Read Me (README.WRI).'' If you don't want
to activate a button you've pressed, just drag the pointer off the
button bar before letting up the mouse button.
While holding down the left mouse button, you can also drag the
mouse pointer over other buttons and see their names on the caption bar.
This is important when you have duplicate icons. You might, for example,
have several Notepad icons, each of which opens a different file. Holding
down the left mouse button in this case will tell you which file will
be opened. Because BTNGO uses group files, you can use Program Manager
to modify your icons and names so they work well for you on the title bar.
But if you make a change in Program Manager, you'll have to restart BTNGO
before you'll see the change.
To create your own Program Manager group for BTNGO, select FileNew,
click on Program Group, and then click on OK. Give the new group a
description and a filename and click OK again. Next, hold down the Ctrl
key and drag the icons for the programs you want on your button bar into
your new group. By holding down the Ctrl key in this step, you make
copies of your icons. This allows you to take advantage of BTNGO without
disturbing your original group organization.
You can also create an association between BTNGO and the .GRP
extension. To do this, open the File Manager and select FileAssociate.
Type GRP in the Files with Extension field, then type in the fully
qualified application name (for example, C:\UTILS\BTNGO.EXE).
In Windows 3.1, you can click the Browse button to open the Browse
dialog box, select BTNGO.EXE and click OK, then click OK again.
Double-clicking on a .GRP file in the File Manager will now bring up
that group as a BTNGO button bar. You'll now also be able to drag a
.GRP filename from File Manager right into a Program Manager group.
The BTNGO icon will appear, and double-clicking on it will produce a
button bar for that group.
Once an association between BTNGO and the .GRP extension has
been created, it becomes easy to automatically start BTNGO each time
you enter Windows. Simply add the name of a group file to a RUN= line
in the [Windows] section of WIN.INI (for example, RUN=C:\WINDOWS\UTILS.GRP),
or if you're running Windows 3.1, add the .GRP file you want to your
Startup group.
You can bypass the Choose .GRP file dialog box by specifying a
group file when you start BTNGO. Indeed, under Windows 3.0, you must
explicitly name a .GRP file on the command line unless one of your
applications has installed the COMMDLG.DLL file on your system or you've
created an association in the manner described above. For example,
entering the following line:
C:\UTILS\BTNGO C:\WINDOWS\MAIN.GRP
in the Program Manager FileRun dialog box will display the button bar
immediately. If you specify this command on the Program Item Properties
command line, you won't have to select the group file each time the
program starts.
As you maintain your group files, you will want to be careful that
they don't get too large if you intend to use them with BTNGO. Since
the button bar arranges all its icons side by side, a group with too
many icons will extend off the screen and some icons may not even appear.
You can avoid this problem by breaking larger groups you want to use
with BTNGO into smaller ones.
When running under Windows 3.1 or later, BTNGO defaults to
displaying itself as a topmost window. In this way, like the Windows
Clock accessory, BTNGO can remain visible even when a full-screen
application is in use. If you find this inconvenient, you simply
need to uncheck the Always On Top option in BTNGO's system menu.
BTNGO stores this preference--along with the last place on the
screen where you put your button bar--in a private BTNGO.INI file
that is created automatically in the same directory that contains
BTNGO.EXE.
If you look inside BTNGO.INI, you'll see that there is a section
for each group file you've used with BTNGO. This allows you, for example,
to keep your Main group displayed permanently atop other windows and
aligned in the lower-right corner of your screen, while your Accessories
group might be in the center of the screen and not float above other
windows.
Notice that BTNGO.INI uses the fully qualified pathname for each
group file as a section header. This enables BTNGO to operate independently
of Program Manager. Program Manager displays only the group files named
in PROGMAN.INI. Once a .GRP file is created, however, BTNGO can use it
even if Program Manager doesn't know about it. Thus, for example, if you
manually remove all references to MAIN.GRP from PROGMAN.INI, the Main
group will no longer be displayed in the Program Manager. But BTNGO will
still be able to open MAIN.GRP, and will retain your Always On Top and
location preferences from session to session.
BTNGO's independence from Program Manager can create one minor
integration problem. For example, if you make changes to your Main group
in Program Manager and then load MAIN.GRP into BTNGO, you may find that
the new arrangement is not reflected on